//
// Created by Joey on 2019/12/14.
//

#include<iostream>

using namespace std;


// 定义结构体
struct Student {
    string name;
    int age;
    int score;
};

int main() {

    Student joey = {"Joey", 20, 99};

    cout << "name: " << joey.name << " age: " << joey.age << " score: " << joey.score << endl;

    // 结构体指针
    Student *pjoey = &joey;

    cout << "name: " << pjoey->name << " age: " << pjoey->age << " score: " << pjoey->score << endl;
}
